<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
//    return view('welcome');
//});

Route::get('/','PostsController@index');

Route::resource('discussions','PostsController');

Route::resource('comment','CommentsController');

Route::get('/users/register','UsersController@register');

Route::get('/users/login','UsersController@login');

Route::get('/users/avater','UsersController@avater');

Route::get('/verify/{confirm_code}','UsersController@confirmEmail');

Route::post('/users/register','UsersController@store');

Route::post('/users/login','UsersController@signin');

Route::get('/users/logout','UsersController@logout');

Route::post('/avater','UsersController@changeAvater');

Route::post('/crop/api','UsersController@cropAvater');

Route::post('/post/upload','PostsController@upload');